package com.fl.nettydemo.agreement;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 起始帧--1
 * 采样率
 * 采样点数
 * 时间
 * 校验位
 */
@Data
@NoArgsConstructor
public class StartFrame extends HeartBeat implements agreementInterface {
    //采样点
    private Integer samplingPoints;
    //采样率
    private Integer samplingRate;

    private String time;
    //校验位
    private Integer CheckBit;
    public StartFrame(String IdentificationFrist, String equipmentCode, Integer ByteNum, Integer sign, String IdentificationEnd,
                      Integer samplingPoints,Integer samplingRate,String time,Integer CheckBit) {
        super(IdentificationFrist, equipmentCode, ByteNum, sign, IdentificationEnd);
        this.setSamplingPoints(samplingPoints);
        this.setSamplingRate(samplingRate);
        this.setTime(time);
        this.setCheckBit(CheckBit);
    }

    public Integer getSamplingPoints() {
        return samplingPoints;
    }

    public void setSamplingPoints(Integer samplingPoints) {
        this.samplingPoints = samplingPoints;
    }

    public Integer getSamplingRate() {
        return samplingRate;
    }

    public void setSamplingRate(Integer samplingRate) {
        this.samplingRate = samplingRate;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public Integer getCheckBit() {
        return CheckBit;
    }

    public void setCheckBit(Integer checkBit) {
        CheckBit = checkBit;
    }

    @Override
    public String toString() {
        return "StartFrame{" +
                "samplingPoints=" + samplingPoints +
                ", samplingRate=" + samplingRate +
                ", time='" + time + '\'' +
                ", CheckBit=" + CheckBit +
                "} " + super.toString();
    }
}
